/**
 * 用来自动编译protobuf的文件为.d.ts的文件，可以让IDE识别并给予提示。
 * 请在项目根目录中执行，执行命令：node out/tools/protobuf.js --filename xxxx(文件名，不需要包含.proto)
 * @author yangxiao
 * @module tools/protobuf
 */
import * as child_process from 'child_process';
import * as argv from '../lib/argv/argv';

let fileName = argv.getCommandArgv('--filename');
child_process.execSync('node node_modules/protobufjs/bin/pbjs asset/server/proto/msg.proto -t json > asset/server/proto/msg.json');
child_process.execSync('node asset/server/proto/proto-msg-build.js --file asset/server/proto/msg.json > asset/server/proto/msg.d.ts');




